package com.phamloc.shootingchicken.scene;

import org.andengine.entity.sprite.Sprite;

import com.phamloc.shootingchicken.GameActivity;
import com.phamloc.shootingchicken.base.BaseScene;
import com.phamloc.shootingchicken.manager.SceneManager.SceneType;

public class SplashScene extends BaseScene {
	private Sprite splash;
	@Override
	public void createScene() {
		splash = new Sprite(0, 0, resourcesManager.splashRegion, vbom);
		splash.setPosition(GameActivity.SCREEN_WIDHT / 2, GameActivity.SCREEN_HIGHT / 2);
		splash.setScale(1.1f);
		attachChild(splash);
	}

	@Override
	public void onBackKeyPressed() {
		System.exit(0);
	}

	@Override
	public SceneType getSceneType() {
		return SceneType.SCENE_SPLASH;
	}

	@Override
	public void disposeScene() {
		splash.detachSelf();
		splash.dispose();
		this.detachSelf();
		this.dispose();
	}

}
